-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add toolkit content #673
base: main
Are you sure you want to change the base?
add toolkit content #673
Conversation
The Solana Toolkit consists of all open sourced tools for smart contract | ||
development on the Solana Blockchain. | ||
|
||
You can contribute to this book on [GitHub](). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can contribute to this book on [GitHub](). | |
You can contribute to this book on | |
[GitHub](https://github.com/solana-foundation/developer-content/tree/main/docs/toolkit). |
### General Smart Contract Scaffold - Create Solana Program | ||
|
||
```shell | ||
pnpm create solana-program |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not everyone has pnpm installed, but node ships with npx
by default. so lets use npx
in this doc. devs that want to use pnpm will know how to modify this as needed
pnpm create solana-program | |
npx create-solana-program |
pnpm install | ||
pnpm generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm install | |
pnpm generate | |
npm install | |
npm dev generate |
|
||
4. Ensure your program’s `Cargo.toml` contains the following metadata: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
```toml filename="Cargo.toml" |
``` | ||
pnpm install | ||
pnpm programs:build | ||
pnpm generate | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
pnpm install | |
pnpm programs:build | |
pnpm generate | |
``` | |
```shell | |
npm install | |
npm run programs:build | |
npm run generate |
### Code Coverage Tool | ||
|
||
```shell | ||
npx solana coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npx solana coverage | |
mucho coverage |
### JavaScript Testing Framework | ||
|
||
```shell | ||
npm install solana-bankrun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm install solana-bankrun | |
npm install solana-bankrun |
solana-test-validator | ||
``` | ||
|
||
Advantages # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Advantages # | |
### Advantages |
```shell | ||
solana-test-validator | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```shell | |
solana-test-validator | |
``` | |
```shell | |
solana-test-validator |
You can also use the mucho
CLI as a superset of solana-test-validator
:
mucho validator
To start your local validator, simply run: | ||
|
||
```shell | ||
solana-test-validator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to use mucho validator
here instead?
Summary of Changes
Added content for a Solana Developers Toolkit
Fixes #